
package easim.examples;

import easim.net.Node;
import jist.swans.Constants;
import jist.swans.misc.Message;

public class Node1 extends Node
{

  public static class Message1 implements Message
  {
    public int getSize() {
      return 1024;
    }
    public void getBytes(byte[] msg, int offset) {
      throw new RuntimeException("no implementation.");
    }
  }

  public Node1(int id) {
    super(id);
  }

  public void receive(Message msg, int srcId, int dstId) {
    System.out.println("Node " + getId() + " received a message");
    System.out.println("  size = " + msg.getSize());
    System.out.println("  source = " + srcId);
    System.out.println("  destination = " + dstId);
    System.out.println();
  }

  public void pump(int queueSize, boolean macBusy) {
  }

}
